import VueRouter from 'vue-router'

import Home from '../pages/Home.vue'
import About from '../pages/About.vue'
import News from '../pages/News.vue'
import Msg from '../pages/Msg.vue'
import Detail from '../pages/Detail.vue'

export default new VueRouter({
    routes:[
        {
            name:'home',
            path:'/home',
            component:Home,
            children:[
                {
                    name:'news',
                    path:'news',
                    component:News
                },
                {
                    name:'msg',
                    path:'msg',
                    component:Msg,
                    children:[
                        {
                            name:'detail',
                            path:'detail',
                            component:Detail
                        }
                    ]
                }
            ]
        },
        {
            name:'about',
            path:'/about',
            component:About
        },
    ]
})